//
//  LYQMineLookedMeCell.m
//  ZCProject
//
//  Created by Zheng on 16/12/6.
//  Copyright © 2016年 Zheng. All rights reserved.
//

#import "LYQMineLookedMeCell.h"

@implementation LYQMineLookedMeCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.iconImgv];
        [self.contentView addSubview:self.nameLbl];
        [self.contentView addSubview:self.companyLbl];
        [self.contentView addSubview:self.dateLbl];
        
    }

    return self;
}

#pragma mark - layout subviews
- (void)layoutSubviews {
    [super layoutSubviews];
    
    [_iconImgv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kWScale(12));
        make.width.height.equalTo(@(kWScale(45)));
        make.centerY.equalTo(self);
    }];
    
    [_nameLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_iconImgv.mas_right).offset(kWScale(15));
        make.top.mas_equalTo(kWScale(15));
    }];
    
    [_companyLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_nameLbl);
        make.top.equalTo(_nameLbl.mas_bottom).offset(kWScale(5));
    }];
    
    [_dateLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-kWScale(10));
        make.top.equalTo(_nameLbl);
    }];
    
}

#pragma mark - load subviews
- (UIImageView *)iconImgv {
    if (_iconImgv) {
        return _iconImgv;
    }
    
    _iconImgv = [[UIImageView alloc] init];
    _iconImgv.layer.cornerRadius = kWScale(22.5);
    _iconImgv.layer.borderColor = [RGB(230, 230, 230, 1) CGColor];
    _iconImgv.layer.borderWidth = kWScale(1.5);
    _iconImgv.backgroundColor = kLYQBlue;
    
    return _iconImgv;
}

- (UILabel *)nameLbl {
    if (_nameLbl) {
        return _nameLbl;
    }
    
    _nameLbl = [[UILabel alloc] init];
    _nameLbl.textColor = kLYQBlack;
    _nameLbl.font = kWFont(15);
    _nameLbl.text = @"李均 | 总监";
    
    return _nameLbl;
}

- (UILabel *)companyLbl {
    if (_companyLbl) {
        return _companyLbl;
    }
    
    _companyLbl = [[UILabel alloc] init];
    _companyLbl.textColor = kHexadecimal(@"666666");
    _companyLbl.font = kWFont(15);
    _companyLbl.text = @"北京博信会展旅行";
    
    return _companyLbl;
}

- (UILabel *)dateLbl {
    if (_dateLbl) {
        return _dateLbl;
    }
    
    _dateLbl = [[UILabel alloc] init];
    _dateLbl.textColor = kHexadecimal(@"666666");
    _dateLbl.font = kWFont(14);
    _dateLbl.text = @"12/30";
    
    return _dateLbl;
}


@end
